Page({
  data: {
    current: '1'
  },
  onChange(e){
    console.log(e);
    var curKey = e.detail.key;
    if(curKey == 0){
      wx.switchTab({
        url: '/pages/index/index',
        success(res){
          console.log(res);
        }
      })
    }else if(curKey == 1){
      wx.switchTab({
        url: '/pages/index/index'
      })
    }else if(curKey == 2){
      wx.switchTab({
        url: '/pages/personal/personal'
      })
    }else{
      console.log("出问题");
    }
  }
})